import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { HttpModule } from '@angular/http';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { MyApp } from './app.component';
import { RegisterPage } from '../pages/register/register';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';

/** 个人中心 */
import { PersonalPage } from '../pages/personal/personal';
/** 忘记密码 */
import { ForgetPage } from '../pages/forget/forget';
/** 余额 */
import { BalancePage } from '../pages/balance/balance';
/** 积分 */
import { IntegralPage } from '../pages/integral/integral';
/** 转出 */
import { TurnPage } from '../pages/turn/turn';
/** 分享 */
import { StarePage } from '../pages/stare/stare';


@NgModule({
  declarations: [
    MyApp,
    RegisterPage,
    ContactPage,
    HomePage,
    TabsPage,
    PersonalPage,
    ForgetPage,
    BalancePage,
    IntegralPage,
    TurnPage,
    StarePage,

  ],
  imports: [
    BrowserModule,
    HttpModule,
    IonicModule.forRoot(MyApp, {backButtonText:'返回'}, {
      links: [
        {
          component: HomePage,
          segment: 'home',
          name:'home'
        },
        {
          component: ContactPage,
          segment: 'contact',
          name:'contact'
        },
        {

          component: RegisterPage,
          segment: 'register',
          name:'register'
        }
      ]
    })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    RegisterPage,
    ContactPage,
    HomePage,
    TabsPage,
    PersonalPage,
    ForgetPage,
    BalancePage,
    IntegralPage,
    TurnPage,
    StarePage,

  ],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: ErrorHandler, useClass: IonicErrorHandler },

  ]
})
export class AppModule { }
